package com.ssm.core.service.impl;

import com.ssm.dal.entity.po.StudentPO;
import com.ssm.dal.mapper.StudentMapper;
import com.ssm.core.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class StudentServiceImpl implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;

    // @Override
    // public PageInfo<StudentPO> listStudent() {
    //     PageHelper.startPage(0, 3);
    //     List<StudentPO> students = studentMapper.select();
    //     PageInfo<StudentPO> pageInfo = new PageInfo<>(students);
    //     return pageInfo;
    // }

    @Override
    @Transactional
    public Integer addStudent(StudentPO studentPO) {
        return studentMapper.insert(studentPO);
    }
}
